<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理工作平台</title>
<link rel="stylesheet" type="text/css" href="Public/tpl-default/css/style.css"/>
<script type="text/javascript" src="Public/js/jquery-1.7.js"></script>
<literal>
<script type="text/javascript" charset="utf-8">
function form_submit(){
	if($("#user").val()=="" || $("#pwd").val()==""){
		return false;
	}
	$.ajax({
		   type: "POST",
		   url: "?m=Admin&a=checkLogin",
		   data: "user="+encodeURIComponent($("#user").val())+"&pwd="+encodeURIComponent($("#pwd").val()),
		   success: function(msg){
		     if(msg=="1"){
		    	 $("#errinfo").html("用户名错误");
		     }else if(msg=="2"){
		    	 $("#errinfo").html("密码错误");
		     }else if(msg=="3"){
		    	window.location.href="?m=Admin&a=main";
		     }else{
		    	 $("#errinfo").html("用户名错误");
		     }
		   }
		}); 
}

</script>
</literal>
</head>
<body>
<div id="top"> </div>
<form id="login" name="login" action="" method="post">
  <div id="center">
    <div id="center_left"></div>
    <div id="center_middle">
      <div class="user">
        <label>用户名：
        <input type="text" name="user" id="user" />
        </label>
      </div>
      <div class="user">
        <label>密　码：
        <input type="password" name="pwd" id="pwd" />
        </label>
      </div>
      <div style="text-align:left;color:#FFF" id="errinfo">
      	
      </div>
    </div>
    <div id="center_middle_right"></div>
    <div id="center_submit">
      <div class="button"> <img src="Public/tpl-default/images/dl.gif" width="57" height="20" onclick="form_submit()" > </div>
      <div class="button"> <img src="Public/tpl-default/images/cz.gif" width="57" height="20" onclick="form_reset()"> </div>
    </div>
    <div id="center_right"></div>
  </div>
</form>
<div id="footer"></div>
</body>
</html>
